const {
  defineConfig
} = require('@vue/cli-service');
// const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');

module.exports = defineConfig({
  transpileDependencies: true,
  // configureWebpack: {
  //   resolve: {alias: {'@': path.join(__dirname, './src')}},
  // },
  devServer: {
    proxy: {
      '/api': {
        target: 'https://cnodejs.org/api/v1',
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      },
      '/erp': {
        target: 'http://erp.wewoo.testing',
        changeOrigin: true,
        pathRewrite: {
          '^/erp': ''
        }
      }
    }
  }
});